package cn.touna.jss.common.properties.disconf;

import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;
import org.springframework.stereotype.Component;

@Component
@DisconfFile(targetDirPath = "disconf", filename = "chaboshi.properties")
public class ChaboshiProperties {

    private String userId = "149057";
    private String keySecret = "63ade083e8825b5116eb48f8617cfa6a";
    private int orderIdCacheDays = 1;

    @DisconfFileItem(name = "chaboshi.userId", associateField = "userId")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @DisconfFileItem(name = "chaboshi.keySecret", associateField = "keySecret")
    public String getKeySecret() {
        return keySecret;
    }

    public void setKeySecret(String keySecret) {
        this.keySecret = keySecret;
    }

    /**
     * 订单号缓存天数
     * @return
     */
    @DisconfFileItem(name = "chaboshi.orderIdCacheDays", associateField = "orderIdCacheDays")
    public int getOrderIdCacheDays() {
        return orderIdCacheDays;
    }

    public void setOrderIdCacheDays(int orderIdCacheDays) {
        this.orderIdCacheDays = orderIdCacheDays;
    }
}
